<%include file="header.tpl"/>
<div class="wrapper lineT">
  <div class="mainBox">
    <div class="main">
<%include file="leftside.tpl"/>
      <div class="dedeCenter" id="personal">
	<div class="fangle">
          <dl class="artList mL10 mR10">
			<form method="post">
				<table style="width: 100%; float: left;" align="left" class="edittable">
				  <tr>
					  <th colspan="5" class="formtitle">分类管理</th>
					</tr>
					<tr>
						<td width=3%>删</td>
						<td width=3%>改</td>
						<td width=80%>分类</td>
						<td >文章数</td>
					</tr>
					%for category in categories:
					<tr>
                            <td><input name="del" value="${category.key().id()}" type="checkbox" /></td>
                            <td><input name="chg" value="${category.key().id()}" type="checkbox" onclick="$('td[id=${category.key().id()}]').html('<span><input name=changevalue id=${category.key().id()} type=text value=${category.category} /></span><input name=change type=submit value=确定 />')"/></td>
                            <td id=${category.key().id()}>${category.category}</td>
                            <td>${category.num}</td>

					</tr>
					   %endfor
					<tr>
					  <td><input name="deletebox" type="checkbox" onclick="$('input[name=del]').attr('checked',this.checked);" /></td>
					  <td><input name="delete" type="submit" value="删除" /></td>
					  <td>
					  %if link['prev']:
						<div class="pages" style="float:right"><a href="/admincp/category/page/${link['page_index']-1}">上一页</a></div>
					  %endif
					  </td>
					  <td><div class="pages">第${num}页，共${link['last']}页</div></td>
					  <td>
					  %if link['next']:
						<div class="pages"><a href="/admincp/category/page/${link['page_index']+1}">下一页</a></div>
					  %endif
					  </td>
					</tr>
				</table>
			 </form>
        </div>
      </div>
      <div class="clear"></div>
    </div>
<%include file="rightside.tpl"/>
  </div>
</div>
<%include file="footer.tpl"/>
